package com.itxzh.springboot.controller;

import com.itxzh.springboot.bean.Department;
import com.itxzh.springboot.mapper.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DeptController {

    @Autowired
    private DepartmentMapper departmentMapper;

    @GetMapping(value = "/getDeptById")
    public Department getDeptById(Integer id){
        return departmentMapper.getDeptById(id);
    }
}
